<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org" lang="en">

<head th:replace="fragments/headTag :: headTag">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>QuDEx Repository Tools - Collections Manager</title>

<!-- Bootstrap -->
<link
	href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.css"
	th:href="@{/webjars/bootstrap/3.0.3/css/bootstrap.css}"
	rel="stylesheet" />
<link href="../../../resources/css/navbar.css"
	th:href="@{/resources/css/navbar.css}" rel="stylesheet" />
<!-- JQuery -->
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"
	th:src="@{/webjars/jquery/1.9.0/jquery.min.js}"></script>
<script
	src="http://netdna.bootstrapcdn.com/twitter-bootstrap/3.0.3/js/bootstrap.min.js"
	th:src="@{/webjars/bootstrap/3.0.3/js/bootstrap.min.js}"></script>

<!-- Spring JS and Ajax -->
<script type="text/javascript" th:src="@{/resources/dojo/dojo.js}"></script>
<script type="text/javascript" th:src="@{/resources/spring/Spring.js}"></script>
<script type="text/javascript"
	th:src="@{/resources/spring/Spring-Dojo.js}"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>
<body>
	<div class="container">
		<div th:include="fragments/bodyHeader :: bodyHeader" th:remove="tag">This
			is the navigation bar here</div>
		<ol class="breadcrumb">
			<li th:text="#{breadcrumbs.process.opselection}">Repository operations selection</li>
			<li class="active" th:text="#{breadcrumbs.process.new-continue}">New/continue collection creation</li>
		</ol>
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 th:text="#{process.colselection.title}" class="panel-title">Existing
					Collection Selection</h3>
			</div>
			<div class="panel-body">
				<p th:if="${rootsList.size() != 0}"
					th:text="#{process.colselection.text}">The following list shows
					collections that do not have any files associated with them.</p>
				<p th:if="${rootsList.size() != 0}"
					th:text="#{process.colselection.text1}">Select one of this
					collections if you would like to continue with the collection
					creation process of an existing collection</p>
				<p th:unless="${rootsList.size() != 0}"
					th:utext="#{process.colselection.text2}">The repository neither
					contains any collections or all of the collections already contain
					Qudex Instances. Please click on the &#34;New Collection&#34;
					button.</p>

				<form id="form-collection" th:action="${flowExecutionUrl}"
					class="form-horizontal" method="post" enctype="multipart/form-data"
					th:object="${filesModel}">
					<div th:if="${rootsList.size() != 0}">
						<fieldset>
							<div class="form-group">
								<label class="col-md-4 control-label" for="mdselect"><span
									th:text="#{process.colselection.select.label}">Collection
										Selection</span></label>
								<div class="col-md-4">
									<div class="input-group">
										<select th:field="*{collectionsIds}"
											name="${status.expression}" class="form-control">
											<option value="">-------</option>
											<option th:each="actualCollection : ${rootsList}"
												th:with="element=${actualCollection.split(';')}"
												th:value="${element[0]}" th:text="${element[1]}" />
										</select>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-4 control-label" for="col"></label>
								<div class="col-md-4">
									<input id="col" name="_eventId_selectedCollection"
										class="btn btn-primary" type="submit"
										value="Select Collection"
										th:value="#{process.colselection.select}" />
								</div>
							</div>
						</fieldset>
					</div>
					<!-- th:unless="${rootsList.size() != 0}" -->
					<div>
						<input class="btn btn-primary" name="_eventId_newCollection"
							type="submit" value="New collection"
							th:value="#{process.colselection.new}" />
					</div>
				</form>
			</div>
		</div>
		<div id="footer" th:include="fragments/footer :: footer"></div>
	</div>
</body>
</html>